<?php
declare (strict_types = 1);

namespace app\common\model;

class Level extends Base
{
   protected $name = 'user_level';
      /**
     * 文本内容
     */
    public function getLevelTextAttr($value, $data)
    {
        if($data['id']>1){
            $text = '伞下'.$data['zt_count'].'个'.parent::where('id',($data['id']-1))->value('title');
        }else{
            $text = '直推'.$data['zt_count'].'人';
        }
        return $text;
    }
}
